const path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const CleanWebpackPlugin = require('clean-webpack-plugin')
//const HapAmendAsyncPlugin = require('./hap.amend')
const packageInfo = require('./package.json')
module.exports = {
    entry: './src/app.js',
    output: {
        filename: 'MS-' + packageInfo.version + '.min.js',
        path: path.resolve(__dirname, 'dist'),
        library: 'MS',
        libraryTarget: 'umd'
    },
    plugins: [
        //new HapAmendAsyncPlugin(),
        new CleanWebpackPlugin(['dist']),
        new UglifyJsPlugin(),
    ]
};